<template>
 <div class="easyd-weixin-Box">
  <div class="app_page_box" style="bottom: 50px;">
   <div class="app_page">
    <div class="app_list_box MARGIN_BOTTOM_10">
     <div class="app_box_title T1">点评内容</div>
     <div class="app_box_content">
      <div class="app_box_content_textarea">
       <textarea name rows="18" cols v-model="commentTxt" placeholder="点击输入你所需要点评本次跟进的不足，给出正确的指导！"></textarea>
      </div>
     </div>
    </div>
   </div>
  </div>
  <div class="app_bottom_box">
   <div class="app_bottom_box_right" @click="save()">保存点评</div>
  </div>
 </div>
</template>

<script>
import { mapState, mapMutations } from "vuex";

export default {
 data() {
  return {
   commentTxt: ""
  };
 },
 computed: {
  ...mapState({
   //				followData: state => state.HistoryFollowModule.followData,
  })
 },
 mounted() {},
 methods: {
  save() {
   this.commentTxt = this.commentTxt.replace(/\n/g, "<br/>");

   var params = {
    cfr_id: this.$route.query.id,
    cfr_comment: this.commentTxt,
    cfr_comment_user: this.$userData.getNickname(),
		organizationName: "asdasdad",
		uid: this.$route.query.uid,
		customerId : this.$route.query.customerId
   };



   this.$easyUtil.startLoading(this);
   this.$http.postHttp(this.$API.homeAddCustomerFollowRecord, params, rs => {
    this.$easyUtil.endLoading(this);

    this.$easyUtil.successToast(this, "点评成功");
    history.go(-1);
   });
  }
 }
};
</script>

<style lang="stylus" scoped>
@import '~PUBLIC_CSS';

.history_follow_info {
 padding: 10px;
 border-bottom: 1px solid #f1f1f1;
}

.history_follow_info .app_box_flex {
 padding-bottom: 5px;
}

.history_follow_info .app_box_flex:last-child {
 padding-bottom: 0;
}

.commentButton {
 border: 1px dashed #fbd417 border-radius 5px height 14px line-height 14px padding 3px 5px margin 20px auto 20px;
}
</style>